FROM node:18-alpine

WORKDIR /app

# Copy package files
COPY package.json .
COPY pnpm-lock.yaml* .

# Install pnpm
RUN npm install -g pnpm

# Install dependencies
RUN pnpm install --frozen-lockfile

# Copy application code
COPY . .

# Expose port
EXPOSE 3000

# Run the application
CMD ["pnpm", "dev"]